package com.greenrift.geneticshelper;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;

public class GeneticsHelperMain extends Activity
{
  private OnClickListener prefsClickListener = new OnClickListener()
  {
    public void onClick( View v )
    {
      Intent settings = new Intent( getBaseContext(), Preferences.class );
      startActivity( settings );
    }
  };

  private OnClickListener hweClickListener = new OnClickListener()
  {
    public void onClick( View v )
    {
      Intent hwe = new Intent( getBaseContext(), GeneticsHelperHWE.class );
      startActivity( hwe );
    }
  };

  /** Called when the activity is first created. */
  @Override
  public void onStart()
  {
    super.onStart();
  }

  @Override
  public void onResume()
  {
    super.onResume();
  }

  @Override
  public void onPause()
  {
    super.onPause();
  }

  private void setFullscreen()
  {
    requestWindowFeature( Window.FEATURE_NO_TITLE );
    getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN );
  }

  @Override
  public void onCreate( Bundle savedInstanceState )
  {
    super.onCreate( savedInstanceState );

    setFullscreen();

    setContentView( R.layout.main );

    Button options = (Button) findViewById( R.id.options_button );
    options.setOnClickListener( prefsClickListener );
    Button hwe = (Button) findViewById( R.id.hwe_button );
    hwe.setOnClickListener( hweClickListener );
  }
}
